﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WMSSoft.Lib.WinKStart.Model.MenuConfig;

namespace WMSSoft.Lib.WinKStart.Extension
{
    public static class NextMenuID
    {
        public static int GetNextMenuID(this Dictionary<string, cWinKStartContextMenuItem> MenuItems)
        {
            try
            {
                if (MenuItems != null)
                {
                    return 500 + MenuItems.Count();
                }
                else
                {
                    return 500;
                }
            }
            catch (Exception Ex) 
            {
                throw new Exception("Can't get next MenuID!", Ex);
            }

        }
    }
}
